/**
 * 网站主页轮播图
 * 
 */

// ***************	网站首页 begin	***************	//
if(_EsdDynamicTransformationScript.isSiteIndexPage){
	
	// 0. 轮播图
	/*	轮播,右下角原点--鼠标点击触发情况
		轮播：只获取轮播中一个a标签。
		以文字a标签为主，图片a标签尽量不要，title不稳定
	*/
	//轮播前的标签
	_EsdDynamicTransformationScript.esdRotationSltPartOneFrontNum1 = $('.qrn_center_box .left_box .xwdt_link a:last');

	//文字A标签
	_EsdDynamicTransformationScript.esdRotationSltPartOneANum1 = $('#D1pic1 a:eq(1)');
	_EsdDynamicTransformationScript.esdRotationSltPartOneANum2 = $('#D1pic1 a:eq(3)');
	_EsdDynamicTransformationScript.esdRotationSltPartOneANum3 = $('#D1pic1 a:eq(5)');
	_EsdDynamicTransformationScript.esdRotationSltPartOneANum4 = $('#D1pic1 a:eq(7)');
	//	alert('_EsdDynamicTransformationScript.esdRotationSltPartOneANum1: ' + _EsdDynamicTransformationScript.esdRotationSltPartOneANum1 + '\n' + '_EsdDynamicTransformationScript.esdRotationSltPartOneANum2: ' + _EsdDynamicTransformationScript.esdRotationSltPartOneANum2 + '\n' + '_EsdDynamicTransformationScript.esdRotationSltPartOneANum3: ' + _EsdDynamicTransformationScript.esdRotationSltPartOneANum3 + '\n' + '_EsdDynamicTransformationScript.esdRotationSltPartOneANum4: ' + _EsdDynamicTransformationScript.esdRotationSltPartOneANum4);

	//原点
	_EsdDynamicTransformationScript.esdRotationSltPartOneCircleNum1 = $('#D1fBt a:eq(0) i:first');
	_EsdDynamicTransformationScript.esdRotationSltPartOneCircleNum2 = $('#D1fBt a:eq(1) i:first');
	_EsdDynamicTransformationScript.esdRotationSltPartOneCircleNum3 = $('#D1fBt a:eq(2) i:first');
	_EsdDynamicTransformationScript.esdRotationSltPartOneCircleNum4 = $('#D1fBt a:eq(3) i:first');
	//	alert('_EsdDynamicTransformationScript.esdRotationSltPartOneCircleNum1: ' + _EsdDynamicTransformationScript.esdRotationSltPartOneCircleNum1 + '\n' + '_EsdDynamicTransformationScript.esdRotationSltPartOneCircleNum2: ' + _EsdDynamicTransformationScript.esdRotationSltPartOneCircleNum2 + '\n' + '_EsdDynamicTransformationScript.esdRotationSltPartOneCircleNum3: ' + _EsdDynamicTransformationScript.esdRotationSltPartOneCircleNum3 + '\n' + '_EsdDynamicTransformationScript.esdRotationSltPartOneCircleNum4: ' + _EsdDynamicTransformationScript.esdRotationSltPartOneCircleNum4);

	//轮播后的标签
	_EsdDynamicTransformationScript.esdRotationSltPartOneAfterNum1 = $(".public_tit:eq(0) a:first");
	//	alert('_EsdDynamicTransformationScript.esdRotationSltPartOneAfterNum1: ' + _EsdDynamicTransformationScript.esdRotationSltPartOneAfterNum1);
	
	//轮播前的焦点
	_EsdDynamicTransformationScript.esdRotationSltPartOneFrontNum1.focus(function (e) {
		$(this).bind("keydown.keydown_0_0", function (e) {
			//  console.log('_EsdDynamicTransformationScript.esdRotationSltPartOneFrontNum1.focus(), e.keyCode= ' + e.keyCode);
			if(e.shiftKey&&e.keyCode==9){
				
			}else if (e.keyCode == 9) {
				_EsdDynamicTransformationScript.esdRotationSltPartOneCircleNum1.click();
				_EsdDynamicTransformationScript.esdRotationSltPartOneANum1.focus();
				return false;
			}
		});
	});
	_EsdDynamicTransformationScript.esdRotationSltPartOneFrontNum1.blur(function () {
		$(this).unbind("keydown.keydown_0_0");
	});

	//轮播图 第一块
	_EsdDynamicTransformationScript.esdRotationSltPartOneANum1.focus(function (e) {
		
		$(this).bind("keydown.keydown_0_1", function (e) {
			if(e.shiftKey&&e.keyCode==9){
				
				Qfast(false, 'widgets', function () {
                    K.tabs({
                        id: 'fsD1',   //焦点图包裹id  
                        conId: "D1pic1",  //** 大图域包裹id  
                        tabId:"D1fBt",  
                        tabTn:"a",
                        conCn: '.fcon', //** 大图域配置class       
                        auto: 1,   //自动播放 1或0
                        effect: 'fade',   //效果配置
                        eType: 'click', //** 鼠标事件
                        pageBt:true,//是否有按钮切换页码
                        bns: ['.prev', '.next'],//** 前后按钮配置class                          
                        interval: 3000  //** 停顿时间  
                    }) 
                })
				
			}else if (e.keyCode == 9) {
				_EsdDynamicTransformationScript.esdRotationSltPartOneCircleNum2.click();
				_EsdDynamicTransformationScript.esdRotationSltPartOneANum2.focus();
				//  console.log(document.activeElement);
				return false;
			}
		});

	});
	_EsdDynamicTransformationScript.esdRotationSltPartOneANum1.blur(function () {
		$(this).unbind("keydown.keydown_0_1");
	});

	//轮播图 第二块
	_EsdDynamicTransformationScript.esdRotationSltPartOneANum2.focus(function (e) {
		$(this).bind("keydown.keydown_0_2", function (e) {
			if(e.shiftKey&&e.keyCode==9){
				_EsdDynamicTransformationScript.esdRotationSltPartOneCircleNum1.click();
				_EsdDynamicTransformationScript.esdRotationSltPartOneANum1.focus();
				return false;
			}else if (e.keyCode == 9) {
				_EsdDynamicTransformationScript.esdRotationSltPartOneCircleNum3.click();
				_EsdDynamicTransformationScript.esdRotationSltPartOneANum3.focus();
				//  console.log(document.activeElement);
				return false;
			}
		});

	});
	_EsdDynamicTransformationScript.esdRotationSltPartOneANum2.blur(function () {
		$(this).unbind("keydown.keydown_0_2");
	});

	//轮播图 第三块
	_EsdDynamicTransformationScript.esdRotationSltPartOneANum3.focus(function (e) {
		$(this).bind("keydown.keydown_0_3", function (e) {
			if(e.shiftKey&&e.keyCode==9){
				_EsdDynamicTransformationScript.esdRotationSltPartOneCircleNum2.click();
				_EsdDynamicTransformationScript.esdRotationSltPartOneANum2.focus();
				return false;
			}else if (e.keyCode == 9) {
				_EsdDynamicTransformationScript.esdRotationSltPartOneCircleNum4.click();
				_EsdDynamicTransformationScript.esdRotationSltPartOneANum4.focus();
				//  console.log(document.activeElement);
				return false;
			}
		});

	});
	_EsdDynamicTransformationScript.esdRotationSltPartOneANum3.blur(function () {
		$(this).unbind("keydown.keydown_0_3");
	});

	//轮播图 第四块
	_EsdDynamicTransformationScript.esdRotationSltPartOneANum4.focus(function (e) {
		$(this).bind("keydown.keydown_0_4", function (e) {
			if(e.shiftKey&&e.keyCode==9){
				_EsdDynamicTransformationScript.esdRotationSltPartOneCircleNum3.click();
				_EsdDynamicTransformationScript.esdRotationSltPartOneANum3.focus();
				return false;
			}else if (e.keyCode == 9) {
				_EsdDynamicTransformationScript.esdRotationSltPartOneAfterNum1.focus();
				//  console.log(document.activeElement);
				
				Qfast(false, 'widgets', function () {
                    K.tabs({
                        id: 'fsD1',   //焦点图包裹id  
                        conId: "D1pic1",  //** 大图域包裹id  
                        tabId:"D1fBt",  
                        tabTn:"a",
                        conCn: '.fcon', //** 大图域配置class       
                        auto: 1,   //自动播放 1或0
                        effect: 'fade',   //效果配置
                        eType: 'click', //** 鼠标事件
                        pageBt:true,//是否有按钮切换页码
                        bns: ['.prev', '.next'],//** 前后按钮配置class                          
                        interval: 3000  //** 停顿时间  
                    }) 
                }) 
				
				return false;
			}
		});

	});
	_EsdDynamicTransformationScript.esdRotationSltPartOneANum4.blur(function () {
		$(this).unbind("keydown.keydown_0_4");
	});

	//轮播后的焦点
	_EsdDynamicTransformationScript.esdRotationSltPartOneAfterNum1.focus(function (e) {
		$(this).bind("keydown.keydown_0_5", function (e) {
			if(e.shiftKey&&e.keyCode==9){
				_EsdDynamicTransformationScript.esdRotationSltPartOneCircleNum4.click();
				_EsdDynamicTransformationScript.esdRotationSltPartOneANum4.focus();
				return false;
			}else if (e.keyCode == 9) {
				
			}
		});

	});
	_EsdDynamicTransformationScript.esdRotationSltPartOneAfterNum1.blur(function () {
		$(this).unbind("keydown.keydown_0_5");
	});
	
	
	
}
// ***************	网站首页 end	***************	//
